import {
	createRouter,
	createWebHashHistory
} from 'vue-router'

let login = import('@/views/login/index.vue'),
	home = import('@/views/home/index.vue'),
	scrollbar = import('@/views/scrollbar/index.vue'),
	upload = import('@/views/upload/index.vue'),
	typography = import('@/views/typography/index.vue'),
	loanHouse = import('@/views/loan/house.vue')

let routes = [{
		path: '/',
		name: 'login',
		component: login
	}, {
		path: '/home',
		name: 'home',
		component: home,
		children: [{
			path: '/loan/house',
			name: '房贷明细',
			component: loanHouse
		},{
			path: '/scrollbar',
			name: '滚动条',
			component: scrollbar
		},{
			path: '/upload',
			name: '上传',
			component: upload
		},{
			path: '/typography',
			name: '排版',
			component: typography
		}]
	}

]

let router = createRouter({
	history: createWebHashHistory(),
	routes
})

export default router
